package cn.rxmind.dlog.demo.controller;

import cn.rxmind.dlog.common.annotation.CollectLog;
import cn.rxmind.dlog.demo.dto.UserLoginDto;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.Map;

/**
 *
 * @description 
 *
 * @author renxin
 * @email renxinzhiliangzhi@163.com
 * @date 2020/7/14 10:05 上午
 */
@RequestMapping("/user")
@RestController
public class UserController {

    @CollectLog
    @PostMapping("/login")
    public Map login(@RequestBody UserLoginDto param){

        HashMap<String, String> result = new HashMap<>();
        result.put("无善无恶心之体","有善有恶意之动");
        result.put("知善知恶是良知","为善去恶是格物");
        return result;
    }

}
